Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add Aurelia v1 samples (complete) #133

Merged
merged 28 commits into from Jan 6, 2023
Merged

Conversation

mroeling
Copy link
Contributor

@mroeling mroeling commented Jan 3, 2023

Resolves: #101

After reading #101, I decided this would be my xmas holiday project.

The code was initially based on the v1.x version, but is now updated with the v2.0.0 branch.

mroeling and others added 24 commits December 29, 2022 23:52
Add event-click, dom-ref and conditional.
Update readme.
Not easy to test. The component is not really unmounted in this case.
cs: add missing enter in 4-1.
Also, fix minor issue in 4-3-slot
Refectoring could be beneficial for quality of the code.
Todo added in Readme.
Links can be set up using pushState, or using hash bashed routing.
The later is used in this example, with link to the documentation.
Update readme with finished matschik#7 and 100% Aurelia1.
@mroeling mroeling mentioned this pull request Jan 3, 2023
Copy link
Owner

@matschik matschik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution !

  • Component names in general are not the same as the other frameworks
  • How the ".ts" file is related to ".html" and ".css" file exactly ? How is it linked ?

I will continue the review after these fixes.

content/2-templating/2-styling/aurelia1/styling.scss Outdated Show resolved Hide resolved
content/2-templating/5-dom-ref/aurelia1/dom-ref.ts Outdated Show resolved Hide resolved
content/3-lifecycle/1-on-mount/aurelia1/on-mount.html Outdated Show resolved Hide resolved
content/3-lifecycle/1-on-mount/aurelia1/on-mount.ts Outdated Show resolved Hide resolved
@mroeling
Copy link
Contributor Author

mroeling commented Jan 5, 2023

  • Component names in general are not the same as the other frameworks

I will update all to use the same names as the other frameworks use.

  • How the ".ts" file is related to ".html" and ".css" file exactly ? How is it linked ?

From the Aurelia documentation (link): "In order to render, we need to create a view for the app component. This introduces the next convention of Aurelia. To create a view for any class, simply create an HTML file with the same name as the ES Next module but change the file extension to .html. Inside that view, you can place an HTML 5 template with data binding expressions declaring how the view should render an instance of the class."
So when the names match, the view / view-model will match. More flexibility is possible within the framework, but that's out of scope for this project.

Styling I will change. It is not connected into the model it seems. We don't use separate files at all, so I should have checked that myself, sorry for that. Link: https://aurelia.io/docs/cli/cli-bundler/basics#styling-your-application

* consistent filenames compared to other frameworks

* improved code style
(applied not just for the templates,
but the other Aurelia files as well.
Used VSCode "Format code" command on all files)
@mroeling mroeling requested a review from matschik January 5, 2023 15:40
content/2-templating/2-styling/aurelia1/css-style.html Outdated Show resolved Hide resolved
content/2-templating/2-styling/aurelia1/css-style.scss Outdated Show resolved Hide resolved
frameworks.mjs Outdated Show resolved Hide resolved
* Since scss is not default, use the standard css files instead.

* Apply filesorter to show the app-files first
@mroeling mroeling requested a review from matschik January 6, 2023 13:43
@matschik matschik merged commit 3a15478 into matschik:main Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Aurelia 1/2 components
2 participants